webpackJsonp([0],{

/***/ 320:
/***/ (function(module, exports, __webpack_require__) {

var disposed = false
var normalizeComponent = __webpack_require__(8)
/* script */
var __vue_script__ = __webpack_require__(340)
/* template */
var __vue_template__ = __webpack_require__(341)
/* template functional */
var __vue_template_functional__ = false
/* styles */
var __vue_styles__ = null
/* scopeId */
var __vue_scopeId__ = null
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
  __vue_script__,
  __vue_template__,
  __vue_template_functional__,
  __vue_styles__,
  __vue_scopeId__,
  __vue_module_identifier__
)
Component.options.__file = "resources\\assets\\js\\pages\\AllList.vue"

/* hot reload */
if (false) {(function () {
  var hotAPI = require("vue-hot-reload-api")
  hotAPI.install(require("vue"), false)
  if (!hotAPI.compatible) return
  module.hot.accept()
  if (!module.hot.data) {
    hotAPI.createRecord("data-v-e0912f90", Component.options)
  } else {
    hotAPI.reload("data-v-e0912f90", Component.options)
  }
  module.hot.dispose(function (data) {
    disposed = true
  })
})()}

module.exports = Component.exports


/***/ }),

/***/ 330:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = {
  getPrintOut: function getPrintOut(id) {
    //打印页
    return axios.get('/api/print-info/' + id);
  },
  setlog: function setlog(id) {
    //打印页打印log
    return axios.get('/api/print-log/' + id);
  },
  getEnrollSituation: function getEnrollSituation() {
    //获取学校招生情况
    return axios.get('/api/situation-info');
  },
  getExportInfo: function getExportInfo(school_id) {
    //导出excl表
    return axios.get('/api/export/school_id=' + school_id);
  },
  postImportInfo: function postImportInfo(file) {
    //导入excl表
    return axios.post('/api/import', file, { headers: { 'Content-Type': 'multipart/form-data' } });
  },
  postSchoolUpperLimit: function postSchoolUpperLimit(id, upperLimit) {
    //重设幼儿园预计招生数
    return axios.post('/api/update-upper-limit/' + id, upperLimit);
  },
  getEnrollAll: function getEnrollAll(id) {
    //录取所有学生
    return axios.get('/api/all-enroll/' + id);
  },
  getStudentInfo: function getStudentInfo(id) {
    //录入页面
    return axios.get('/api/sign-up/' + id);
  },
  getPolice: function getPolice(id) {
    //录入页面根据幼儿园code获取派出所
    return axios.get('/api/police/' + id);
  },
  postStudent: function postStudent(model) {
    return axios.post('/api/sign-up/post', model);
  },
  putStudent: function putStudent(uuid, model) {
    return axios.put('/api/sign-up/' + uuid, model);
  },
  getUserInfo: function getUserInfo(id) {
    return axios.get('/api/user/' + id);
  },
  postUserInfo: function postUserInfo(model) {
    return axios.post('/api/user', model);
  },
  putUserInfo: function putUserInfo(uuid, model) {
    return axios.put('/api/user/' + uuid, model);
  },
  DeletedUserInfo: function DeletedUserInfo(uuid) {
    return axios.delete('/api/user/' + uuid);
  }
};

/***/ }),

/***/ 331:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

var _isIterable2 = __webpack_require__(332);

var _isIterable3 = _interopRequireDefault(_isIterable2);

var _getIterator2 = __webpack_require__(335);

var _getIterator3 = _interopRequireDefault(_getIterator2);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.default = function () {
  function sliceIterator(arr, i) {
    var _arr = [];
    var _n = true;
    var _d = false;
    var _e = undefined;

    try {
      for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) {
        _arr.push(_s.value);

        if (i && _arr.length === i) break;
      }
    } catch (err) {
      _d = true;
      _e = err;
    } finally {
      try {
        if (!_n && _i["return"]) _i["return"]();
      } finally {
        if (_d) throw _e;
      }
    }

    return _arr;
  }

  return function (arr, i) {
    if (Array.isArray(arr)) {
      return arr;
    } else if ((0, _isIterable3.default)(Object(arr))) {
      return sliceIterator(arr, i);
    } else {
      throw new TypeError("Invalid attempt to destructure non-iterable instance");
    }
  };
}();

/***/ }),

/***/ 332:
/***/ (function(module, exports, __webpack_require__) {

module.exports = { "default": __webpack_require__(333), __esModule: true };

/***/ }),

/***/ 333:
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(71);
__webpack_require__(70);
module.exports = __webpack_require__(334);


/***/ }),

/***/ 334:
/***/ (function(module, exports, __webpack_require__) {

var classof = __webpack_require__(73);
var ITERATOR = __webpack_require__(5)('iterator');
var Iterators = __webpack_require__(27);
module.exports = __webpack_require__(7).isIterable = function (it) {
  var O = Object(it);
  return O[ITERATOR] !== undefined
    || '@@iterator' in O
    // eslint-disable-next-line no-prototype-builtins
    || Iterators.hasOwnProperty(classof(O));
};


/***/ }),

/***/ 335:
/***/ (function(module, exports, __webpack_require__) {

module.exports = { "default": __webpack_require__(336), __esModule: true };

/***/ }),

/***/ 336:
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(71);
__webpack_require__(70);
module.exports = __webpack_require__(337);


/***/ }),

/***/ 337:
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__(12);
var get = __webpack_require__(125);
module.exports = __webpack_require__(7).getIterator = function (it) {
  var iterFn = get(it);
  if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');
  return anObject(iterFn.call(it));
};


/***/ }),

/***/ 338:
/***/ (function(module, exports) {

module.exports = "/images/updateimg.png?fac069a6e6f9a976c2da02d0822d5d26";

/***/ }),

/***/ 339:
/***/ (function(module, exports) {

module.exports = "/images/deletedimg.png?d067a71dfc867b740bf12384b4767339";

/***/ }),

/***/ 340:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

var _extends2 = __webpack_require__(74);

var _extends3 = _interopRequireDefault(_extends2);

var _slicedToArray2 = __webpack_require__(331);

var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);

var _promise = __webpack_require__(124);

var _promise2 = _interopRequireDefault(_promise);

var _ListDataSource = __webpack_require__(123);

var _ListDataSource2 = _interopRequireDefault(_ListDataSource);

var _jsCookie = __webpack_require__(72);

var _jsCookie2 = _interopRequireDefault(_jsCookie);

var _vuex = __webpack_require__(43);

var _data = __webpack_require__(330);

var _data2 = _interopRequireDefault(_data);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

exports.default = {
  data: function data() {
    var downloadGet = function downloadGet(config) {

      var url = config.url;
      var iframe = document.createElement('iframe');
      iframe.style.display = 'none';
      iframe.src = url;
      iframe.onload = function () {
        document.body.removeChild(iframe);
      };
      document.body.appendChild(iframe);
    };
    return {
      tableList: new _ListDataSource2.default('/api/all-list'),
      model: this.$modelDataSource({
        url: '/api/all-list',
        dataKey: 'model',
        attributes: {
          id: 0
        }
      }),
      queryModel: {
        keyword: '0'
      },
      refreshList: true,
      fileData: {},
      schoolNameList: [{ name: '所有幼儿园', id: '0' }, { name: '第一幼儿园', id: '101' }, { name: '第二幼儿园', id: '102' }, { name: '第四幼儿园', id: '104' }, { name: '模范幼儿园', id: '106' }, { name: '第三幼儿园', id: '103' }, { name: '第五幼儿园', id: '105' }],
      disabled: false
    };
  },
  created: function created() {
    var vm = this;
    if (this.$route.params.school) {
      vm.queryModel.keyword = this.$route.params.school;
      //      console.log(vm.queryModel.keyword)
      vm.disabled = true;
    }
    this.isLoading = true;
    _promise2.default.all([vm.tableList.fetchData(vm.queryModel)]).then(function (_ref) {
      var _ref2 = (0, _slicedToArray3.default)(_ref, 1),
          Response = _ref2[0];

      vm.isLoading = false;
    }).catch(function (error) {
      vm.isLoading = false;
    });
  },

  methods: {
    enroll: function enroll(type) {
      switch (type) {
        case 1:
          return '已录取';
          break;
        case 0:
          return '未录取';
          break;
        default:
          return '无';
      }
    },
    isSex: function isSex(type) {
      switch (type) {
        case '0':
          return '男';
          break;
        default:
          return '女';
      }
    },

    goPage: function goPage(event) {
      var self = this;
      var query = _.assign({ page: event.page }, self.queryString);
      self.tableList.fetchData(query);
    },
    update: function update(id) {
      this.$router.push({
        name: 'entering',
        params: {
          user_id: id
        }
      });
    },
    exportInfo: function exportInfo() {
      var self = this;
      //      DataApi.getExportInfo(self.queryModel.keyword).then(res=>{
      axios.get('/api/export?school_id=' + this.queryModel.keyword, function (res) {});
      //        })
    },
    importInfo: function importInfo() {
      this.$refs.importInfoFile.click();
    },
    getFile: function getFile(files) {
      var self = this;
      var file = files.target.files[0];
      console.log(file);
      this.fileData = new FormData();
      this.fileData.append('file', file);
      _data2.default.postImportInfo(this.fileData).then(function (res) {
        console.log('上传' + res + '成功');
        self.refreshList = !self.refreshList;
        self.$message.success('导入成功');
      }).catch(function (err) {
        self.refreshList = !self.refreshList;
        console.log(err.response);
        self.$message.error('导入失败');
      });
    },
    logout: function logout() {
      axios.post('/api/logout', {}).then(function (response) {
        _jsCookie2.default.remove('user');
        window.location.reload();
      }).catch(function (error) {
        console.log(error);
      });
    },
    deleted: function deleted(id) {
      var self = this;
      this.$confirm('此操作将永久删除该学生,如果是双（多）胞胎，则会全部删除, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(function () {
        self.model.fetch(id, {}, function () {});
        self.model.destroy(function () {
          self.$message.success('删除成功!');
          self.refreshList = !self.refreshList;
        });
      }).catch(function () {
        self.$message({
          type: 'info',
          message: '取消删除'
        });
      });
    },
    toPrint: function toPrint(id) {
      this.$router.push({
        name: 'print',
        params: {
          user_id: id
        }
      });
    }
  },
  computed: (0, _extends3.default)({}, (0, _vuex.mapState)({
    user: function user(state) {
      return state.user;
    }
  })),
  watch: {
    'queryModel.keyword': function queryModelKeyword(value) {
      this.tableList.fetchData(this.queryModel);
    },
    'refreshList': function refreshList() {
      this.tableList.fetchData(this.queryModel);
    }
  }
};

/***/ }),

/***/ 341:
/***/ (function(module, exports, __webpack_require__) {

var render = function() {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  return _c(
    "div",
    { staticClass: "all-list all-list-select" },
    [
      _c(
        "el-card",
        { staticClass: "container mt-4" },
        [
          _c(
            "div",
            {
              staticClass: "clearfix",
              attrs: { slot: "header" },
              slot: "header"
            },
            [
              _c("span", [
                _c("span", { staticClass: "card-header-box" }),
                _vm._v("报名管理")
              ]),
              _vm._v(" "),
              _c(
                "a",
                {
                  staticClass: "list-button float-right p-1",
                  attrs: { href: "javascript:;" },
                  on: { click: _vm.logout }
                },
                [_vm._v("登出")]
              ),
              _vm._v(" "),
              _vm.user.type == "admin"
                ? _c(
                    "button",
                    { staticClass: "list-button float-right mr-3" },
                    [
                      _c(
                        "a",
                        {
                          attrs: {
                            href:
                              "/api/export?api_token=" +
                              _vm.user.token +
                              "&school_id=" +
                              _vm.queryModel.keyword
                          }
                        },
                        [_vm._v("信息导出")]
                      )
                    ]
                  )
                : _vm._e(),
              _vm._v(" "),
              _vm.user.type == "admin"
                ? _c(
                    "button",
                    {
                      staticClass: "list-button float-right mr-3",
                      on: { click: _vm.importInfo }
                    },
                    [
                      _c("a", { attrs: { href: "javascript:;" } }, [
                        _vm._v("信息导入")
                      ])
                    ]
                  )
                : _vm._e(),
              _vm._v(" "),
              _c("input", {
                ref: "importInfoFile",
                attrs: { type: "file", hidden: "" },
                on: { change: _vm.getFile }
              })
            ]
          ),
          _vm._v(" "),
          _c(
            "vue-table",
            {
              attrs: {
                "data-source": _vm.tableList,
                queryString: _vm.queryModel
              },
              scopedSlots: _vm._u([
                {
                  key: "tbody",
                  fn: function(props) {
                    return [
                      _c(
                        "tr",
                        { class: props.index % 2 == 0 ? "table-row" : "" },
                        [
                          _c("td", [_vm._v(_vm._s(props.item.name))]),
                          _vm._v(" "),
                          _c("td", [_vm._v(_vm._s(_vm.isSex(props.item.sex)))]),
                          _vm._v(" "),
                          _c("td", [_vm._v(_vm._s(props.item.id_code))]),
                          _vm._v(" "),
                          _c("td", [_vm._v(_vm._s(props.item.school_name))]),
                          _vm._v(" "),
                          _c("td", [
                            _vm._v(_vm._s(_vm.enroll(props.item.is_enroll)))
                          ]),
                          _vm._v(" "),
                          _c(
                            "td",
                            [
                              _c(
                                "el-tooltip",
                                {
                                  staticClass: "mr-2",
                                  attrs: { content: "修改", placement: "top" }
                                },
                                [
                                  _c("img", {
                                    attrs: {
                                      src: __webpack_require__(338),
                                      height: "17",
                                      width: "17"
                                    },
                                    on: {
                                      click: function($event) {
                                        _vm.update(props.item.id)
                                      }
                                    }
                                  })
                                ]
                              ),
                              _vm._v(" "),
                              _c(
                                "el-tooltip",
                                {
                                  staticClass: "mr-2",
                                  attrs: { content: "打印", placement: "top" }
                                },
                                [
                                  _c("img", {
                                    attrs: {
                                      src: __webpack_require__(342),
                                      height: "17",
                                      width: "17"
                                    },
                                    on: {
                                      click: function($event) {
                                        _vm.toPrint(props.item.id)
                                      }
                                    }
                                  })
                                ]
                              ),
                              _vm._v(" "),
                              _c(
                                "el-tooltip",
                                {
                                  attrs: { content: "删除", placement: "top" }
                                },
                                [
                                  _c("img", {
                                    attrs: {
                                      src: __webpack_require__(339),
                                      height: "17",
                                      width: "17"
                                    },
                                    on: {
                                      click: function($event) {
                                        _vm.deleted(props.item.id)
                                      }
                                    }
                                  })
                                ]
                              )
                            ],
                            1
                          )
                        ]
                      )
                    ]
                  }
                }
              ])
            },
            [
              _c("template", { slot: "header" }, [
                _c("tr", [
                  _c("th", { attrs: { scope: "col" } }, [_vm._v("学生姓名")]),
                  _vm._v(" "),
                  _c("th", { attrs: { scope: "col" } }, [_vm._v("性别")]),
                  _vm._v(" "),
                  _c("th", { attrs: { scope: "col" } }, [_vm._v("身份证号")]),
                  _vm._v(" "),
                  _c(
                    "th",
                    { attrs: { scope: "col d-flex justify-content-center" } },
                    [
                      _c(
                        "el-select",
                        {
                          staticStyle: { "font-weight": "500" },
                          attrs: { disabled: _vm.disabled },
                          model: {
                            value: _vm.queryModel.keyword,
                            callback: function($$v) {
                              _vm.$set(_vm.queryModel, "keyword", $$v)
                            },
                            expression: "queryModel.keyword"
                          }
                        },
                        _vm._l(_vm.schoolNameList, function(item) {
                          return _c("el-option", {
                            key: item.id,
                            attrs: { label: item.name, value: item.id }
                          })
                        })
                      )
                    ],
                    1
                  ),
                  _vm._v(" "),
                  _c("th", { attrs: { scope: "col" } }, [_vm._v("录取结果")]),
                  _vm._v(" "),
                  _c("th", { attrs: { scope: "col" } }, [_vm._v("操作")])
                ])
              ])
            ],
            2
          )
        ],
        1
      ),
      _vm._v(" "),
      _c(
        "div",
        [
          _c("cplanet-pagination", {
            attrs: {
              "page-count": _vm.tableList.meta.last_page,
              total: _vm.tableList.meta.total,
              "current-page": _vm.tableList.meta.current_page
            },
            on: { goPage: _vm.goPage }
          })
        ],
        1
      )
    ],
    1
  )
}
var staticRenderFns = []
render._withStripped = true
module.exports = { render: render, staticRenderFns: staticRenderFns }
if (false) {
  module.hot.accept()
  if (module.hot.data) {
    require("vue-hot-reload-api")      .rerender("data-v-e0912f90", module.exports)
  }
}

/***/ }),

/***/ 342:
/***/ (function(module, exports) {

module.exports = "/images/print.png?b52392cdab90e254ff4c1c10d7cdf7c5";

/***/ })

});